package com.fahai.web.entity;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by jiangchong on 2017/5/8.
 */
@Data
public class UserInfo {
    @Id
    private Integer userid;
    @Transient
    private Integer uid;

    private Integer proid;

    private Integer qid;

    private String ugcode;

    private String wxopenid;

    private String uname;

    private String userpy;

    private String userpig;

    private String uphone;

    private String upassword;

    private String uphoneArea;

    private Integer utype;

    private Integer urmoney;

    private Integer lawyerid;

    private String laids;

    private Integer isconf;

    private Integer ustates;

    private Integer isvalid;

    private Integer atimes;

    private Date firstTime;

    private Date lastTime;

    private Date registerTime;

    public Date getFirstTime() {
        if (null == firstTime) {
            return null;
        }
        Calendar date = Calendar.getInstance();
        date.setTime(firstTime);
        return date.getTime();
    }

    public Date getLastTime() {
        if (null == lastTime) {
            return null;
        }
        Calendar date = Calendar.getInstance();
        date.setTime(lastTime);
        return date.getTime();


    }

    public Date getRegisterTime() {
        if (null == registerTime) {
            return null;
        }
        Calendar date = Calendar.getInstance();
        date.setTime(registerTime);
        return date.getTime();

    }

    public Date getCreateTime() {
        if (null == createTime) {
            return null;
        }
        Calendar date = Calendar.getInstance();
        date.setTime(createTime);
        return date.getTime();

    }

    public Date getUpdateTime() {
        if (null == updateTime) {
            return null;
        }
        Calendar date = Calendar.getInstance();
        date.setTime(updateTime);
        return date.getTime();

    }

    private Date createTime;

    private Date updateTime;

    private String remark;

    private String bak;

    private String bak1;

    private String bak2;

}
